package com.yequan.hashcode;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author yequan
 * @date 2019/12/06
 */
public class HashCode {

    public static void main(String[] args) {
        Set<String> stringSet = new HashSet<>();
        System.out.println(stringSet.hashCode());
        System.out.println("------------------");
        stringSet.add("1");
        System.out.println(stringSet.hashCode());
        Map<Integer, Boolean> finishedMap = new ConcurrentHashMap<>();
        finishedMap.put(1, false);
        System.out.println(finishedMap.get(1));
        finishedMap.put(1, true);
        System.out.println(finishedMap.get(1));
        int i = 0;
        while (true) {
            if (i++ == 500) {
                System.out.println("i=500");
                continue;
            }
            if (i++ > 1000) {
                System.out.println("退出了");
                return;
            }
        }
    }

}
